{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'bc'"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\"abc\"[1:]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "https://leetcode.com/problems/backspace-string-compare\n",
    "\n",
    "\n",
    "\n",
    "Runtime: 32 ms, faster than 55.24% of Python3 online submissions for Backspace String Compare.\n",
    "Memory Usage: 14.2 MB, less than 49.13% of Python3 online submissions for Backspace String Compare.\n",
    "\n",
    "\n",
    "\n",
    "```python\n",
    "class Solution:\n",
    "    def backspaceCompare(this, S: str, T: str) -> bool:\n",
    "        return this.textBox(S) == this.textBox(T)\n",
    "    \n",
    "    def textBox(this, s: str) -> str:\n",
    "        r = \"\"\n",
    "        for c in s:\n",
    "            if c == \"#\":\n",
    "                r = r[:-1]\n",
    "            else:\n",
    "                r += c\n",
    "        return r\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
